package com.wnxy.admin.controller;

import com.wnxy.admin.common.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import com.wnxy.admin.entity.Coupon;
import com.wnxy.admin.service.ICouponService;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 优惠券信息表 前端控制器
 * </p>
 *
 * @author All
 * @since 2023-11-29
 */
@RestController
@RequestMapping("/coupon")
public class CouponController {

    private final ICouponService couponServiceImpl;
    public CouponController(ICouponService couponServiceImpl){
        this.couponServiceImpl = couponServiceImpl;
    }

    @GetMapping("countCoupon")
    public ResponseResult countCoupon(){
        Long countCoupon = couponServiceImpl.countCoupon();
        return ResponseResult.ok(countCoupon);
    }

}
